import http from "./http";
import qs from "qs";
// 获取图片域名
export const getImgUrl = (params) => {
  return http.get("/manager/getImgUrl", params)
}
// 更新系统设置信息
export const systemSettingSave = (params) => {
  return http.post("/manager/sys/save", params)
}
// 获取系统设置所有信息
export const systemSettingInfo = (params) => {
  return http.get("/manager/sys/list", params)
}

// 更新收款设置/渠道设置信息
export const payeeUpdate = (params) => {
  return http.post("/manager/payee/update", params)
}
// 收款设置/渠道设置信息修改状态 1启用 0停用
export const payeeUpdateStatus = (params) => {
  return http.post("/manager/payee/updateStatus", qs.stringify(params))
}
// 新增收款设置/渠道设置信息
export const payeeSave = (params) => {
  return http.post("/manager/payee/save", params)
}
// 根据id查询收款设置/渠道设置信息
export const payeeInfo = (params) => {
  return http.get("/manager/payee/payeeInfo", params)
}
// 获取收款列表信息
export const payeeList = (params) => {
  return http.get("/manager/payee/list", params)
}
// 根据Id删除收款设置/渠道设置信息
export const payeeDetele = (params) => {
  return http.get("/manager/payee/delete", params)
}


// 渠道设置信息
export const channelUpdate = (params) => {
  return http.post("/manager/channel/update", params)
}
// 渠道设置信息修改状态 1启用 0停用
export const channelUpdateStatus = (params) => {
  return http.post("/manager/channel/updateStatus", qs.stringify(params))
}
// 渠道设置信息
export const channelSave = (params) => {
  return http.post("/manager/channel/save", params)
}
// 渠道设置信息
export const channelInfo = (params) => {
  return http.get("/manager/channel/channelInfo", params)
}
// 获取收款列表信息
export const channelList = (params) => {
  return http.get("/manager/channel/list", params)
}
// 根据Id删除收款设置/渠道设置信息
export const channelDetele = (params) => {
  return http.get("/manager/channel/delete", params)
}


// 更新商户存提信息
export const depositWithdUpdate = (params) => {
  return http.post("/manager/depositWith/update", params)
}
// 更新商户存提修改状态 1启用 0停用
export const depositWithdUpdateStatus = (params) => {
  return http.post("/manager/depositWith/updateStatus", qs.stringify(params))
}
// 新增商户存提信息
export const depositWithdSave = (params) => {
  return http.post("/manager/depositWith/save", params)
}
// 根据id获取商户存提信息
export const depositWithdInfo = (params) => {
  return http.get("/manager/depositWith/byId", params)
}
// 获取商户存提信息列表
export const depositWithdList = (params) => {
  return http.get("/manager/depositWith/list", params)
}
// 根据Id删除商户存提信息
export const depositWithdDetele = (params) => {
  return http.get("/manager/depositWith/delete", params)
}

// 更新轮播图
export const advertUpdate = (params) => {
  return http.post("/manager/advert/update", params)
}
// 更新轮播图状态 1启用 0停用
export const advertUpdateStatus = (params) => {
  return http.post("/manager/advert/updateStatus", qs.stringify(params))
}
// 新增轮播图
export const advertSave = (params) => {
  return http.post("/manager/advert/save", params)
}
// 根据id获取轮播图
export const advertInfo = (params) => {
  return http.get("/manager/advert/byId", params)
}
// 获取轮播图列表
export const advertList = (params) => {
  return http.get("/manager/advert/list", params)
}
// 根据Id删除轮播图
export const advertDetele = (params) => {
  return http.get("/manager/advert/delete", params)
}

// 获取商户分类
export const merchantClassList = (params) => {
  return http.get("/manager/class/list", params)
}
// 商户分类更新
export const merchantClassUpdate = (params) => {
  return http.post("/manager/class/updateDefaultClass", params)
}
// 商户分类新增
export const merchantClassSave = (params) => {
  return http.post("/manager/class/save", params)
}
// 商户分类删除
export const merchantClassDetele = (params) => {
  return http.get("/manager/class/delete", params)
}
// 商户分类详情
export const merchantClassInfo = (params) => {
  return http.get("/manager/class/byId", params)
}

// 获取币种分类
export const currencyList = (params) => {
  return http.get("/manager/payee/list", params)
}


// 更新信用等级
export const gradeUpdate = (params) => {
  return http.post("/manager/grade/update", params)
}
// 更新信用等级修改状态 1启用 0停用
export const gradeUpdateStatus = (params) => {
  return http.post("/manager/grade/updateStatus", qs.stringify(params))
}
// 新增信用等级
export const gradeSave = (params) => {
  return http.post("/manager/grade/save", params)
}
// 根据id获取信用等级
export const gradeInfo = (params) => {
  return http.get("/manager/grade/byId", params)
}
// 获取信用等级列表
export const gradeList = (params) => {
  return http.get("/manager/grade/list", params)
}
// 根据Id删除信用等级
export const gradeDetele = (params) => {
  return http.get("/manager/grade/delete", params)
}

// 更新公告
export const noticeUpdate = (params) => {
  return http.post("/manager/notice/update", params)
}
// 更新公告修改状态 1启用 0停用
export const noticeUpdateStatus = (params) => {
  return http.post("/manager/notice/updateStatus", qs.stringify(params))
}
// 新增公告
export const noticeSave = (params) => {
  return http.post("/manager/notice/save", params)
}
// 根据id获取公告
export const noticeInfo = (params) => {
  return http.get("/manager/notice/byId", params)
}
// 获取公告列表
export const noticeList = (params) => {
  return http.get("/manager/notice/list", params)
}
// 根据Id删除公告
export const noticeDetele = (params) => {
  return http.get("/manager/notice/delete", params)
}

// 更新银行卡
export const bankUpdate = (params) => {
  return http.post("/manager/bank/update", params)
}
// 更新银行卡修改状态 1启用 0停用
export const bankUpdateStatus = (params) => {
  return http.post("/manager/bank/updateStatus", qs.stringify(params))
}
// 新增银行卡
export const bankSave = (params) => {
  return http.post("/manager/bank/save", params)
}
// 根据id获取银行卡
export const bankInfo = (params) => {
  return http.get("/manager/bank/byId", params)
}
// 获取银行卡列表
export const bankList = (params) => {
  return http.get("/manager/bank/list", params)
}
// 根据Id删除银行卡
export const bankDetele = (params) => {
  return http.get("/manager/bank/delete", params)
}


// 获取白名单
export const whiteList = (params) => {
  return http.get("/manager/white/list", params)
}
// 白名单更新
export const whiteUpdate = (params) => {
  return http.post("/manager/white/update", params)
}
// 白名单新增
export const whiteSave = (params) => {
  return http.post("/manager/white/save", params)
}
// 白名单删除
export const whiteDetele = (params) => {
  return http.get("/manager/white/delete", params)
}
// 白名单详情
export const whiteInfo = (params) => {
  return http.get("/manager/white/byId", params)
}


// 获取黑名单
export const blackList = (params) => {
  return http.get("/manager/black/list", params)
}
// 黑名单更新
export const blackUpdate = (params) => {
  return http.post("/manager/black/update", params)
}
// 黑名单新增
export const blackSave = (params) => {
  return http.post("/manager/black/save", params)
}
// 黑名单删除
export const blackDetele = (params) => {
  return http.get("/manager/black/delete", params)
}
// 黑名单详情
export const blackInfo = (params) => {
  return http.get("/manager/black/byId", params)
}

// 角色列表查询
export const roleList = (params) => {
  return http.get("/sys/role/listRole", params)
}
// 新增角色
export const addRole = (params) => {
  return http.post("/sys/role/addRoleAndPermissions", params)
}
// 编辑角色
export const updateRole = (params) => {
  return http.post("/sys/role/updateRoleAndPermissions", params)
}
// 删除角色
export const delRole = (params) => {
  return http.post("/sys/role/delRole", params)
}
// 查询对应角色下的账号
export const findByRoleId = (params) => {
  return http.get("/sys/role/findByRoleId", params)
}
// 查询相应登录站点的全部权限列表
export const getPermissionList = (params) => {
  return http.get("/sys/role/getPermissionList", params)
}


// 获取用户最新5笔登录记录
export const queryHistory = (params) => {
  return http.get("/manager/history/queryHistory", params)
}
// 分页获取操作日志信息
export const operatorList = (params) => {
  return http.get("/manager/operator/list", params)
}
// 分页获取日志信息
export const historyList = (params) => {
  return http.get("/manager/history/list", params)
}


// 分页获取商户操作日志信息UserId
export const merchantUserIdOperatorHistory = (params) => {
  return http.get("/manager/merchant/operatorHistory", params)
}
// 分页获取商户日志信息UserId
export const merchantUserIdLoginHistory = (params) => {
  return http.get("/manager/merchant/loginHistory", params)
}
// 分页获取商户操作日志信息
export const merchantOperatorHistory = (params) => {
  return http.get("/manager/merchant/merchantOperatorPage", params)
}
// 分页获取商户日志信息
export const merchantLoginHistory = (params) => {
  return http.get("/manager/merchant/merchantLoginHistoryPage", params)
}
// 商户列表
export const merchantList = (params) => {
  return http.get("/manager/merchant/list", params)
}
// 新增商户
export const addUserMerchant = (params) => {
  return http.post("/manager/merchant/save", params)
}
// 商户详情
export const merchantInfo = (params) => {
  return http.get("/manager/merchant/getById", params)
}
// 商户修改状态
export const merchantUpdateStatus = (params) => {
  return http.post("/manager/merchant/updateStatus", qs.stringify(params))
}
// 商户修改
export const merchantUpdate = (params) => {
  return http.post("/manager/merchant/updateInfo?"+qs.stringify(params))
}
// 重置交易密码
export const merchantResetTransPwd = (params) => {
  return http.post("/manager/merchant/resetTransPwd?"+qs.stringify(params))
}
// 重置密钥
export const merchantResetPrivateKey = (params) => {
  return http.post("/manager/merchant/resetPrivateKey?"+qs.stringify(params))
}
// 重置登录密码
export const merchantResetLoginPwd = (params) => {
  return http.post("/manager/merchant/resetLoginPwd?"+qs.stringify(params))
}
// 修改余额-充值
export const merchantRecharge = (params) => {
  return http.post("/manager/merchant/recharge", params)
}
// 修改余额-提款
export const merchantDraw = (params) => {
  return http.post("/manager/merchant/draw", params)
}
// 获取修改余额是否需要交易密码
export const checkTransPwd = (params) => {
  return http.get("/manager/member/checkTransPwd", params)
}
// 账变记录
export const merchantBalanceHistory = (params) => {
  return http.get("/manager/merchant/balanceHistory", params)
}
// 商户USDT充值
export const merchantUsdtRecharge = (params) => {
  return http.post("/manager/merchant/usdtRecharge", params)
}
// 获取usdt汇率
export const merchantGetRate = (params) => {
  return http.get("/manager/merchant/getRate", params)
}
// 获取商户手续费
export const merchantGetFee = (params) => {
  return http.get("/manager/merchant/getFee", params)
}
// 用户名模糊查询
export const merchantAccountLike = (params) => {
  return http.get("/manager/merchant/accountLike", params)
}

// 绑定谷歌验证器
export const bindAccount = (params) => {
  return http.post("/manager/auth/bind", params)
}
// 重置谷歌验证器-当前账号
export const reset = (params) => {
  return http.post("/manager/auth/reset", params)
}
// 重置谷歌验证器-重置其他账号（公司站可以重置任何账号， 代理账号可以重置下级代理）
export const resetUserSecret = (params) => {
  return http.post("/manager/auth/resetUserSecret", params)
}
// 获取谷歌验证器密钥与二维码
export const secret = (params) => {
  return http.get("/manager/auth/secret", params)
}
// 检查账号是否绑定谷歌验证器 true-已绑定， false-未绑定
export const checkBind = (params) => {
  return http.get("/manager/auth/checkBind", params)
}

// 新增会员
export const memberCreate = (params) => {
  return http.post("/manager/member/create", params)
}
//新增会员参数
export const memberParam = (params) => {
  return http.get("/manager/member/param", params)
}



// 获取首页交易数据
export const homeTransData = (params) => {
  return http.get("/manager/home/transData", params)
}

// 获取首页会员交易数据
export const homeMemberData = (params) => {
  return http.get("/manager/home/memberData", params)
}

// 获取首页顶部统计数据
export const homeIndex = (params) => {
  return http.get("/manager/home/index", params)
}


// 商户白名单修改
export const merchantWhiteListUpdate = (params) => {
  return http.post("/manager/merchantWhiteList/update", params)
}
// 商户白名单删除
export const merchantWhiteListDelete = (params) => {
  return http.post("/manager/merchantWhiteList/delete?"+qs.stringify(params))
}
// 商户白名单新增
export const merchantWhiteListAdd = (params) => {
  return http.post("/manager/merchantWhiteList/add", params)
}
// 商户白名单列表
export const merchantWhiteListPage = (params) => {
  return http.get("/manager/merchantWhiteList/page", params)
}




// eslint-disable-next-line import/no-anonymous-default-export
export default {
  merchantWhiteListUpdate,
  merchantWhiteListDelete,
  merchantWhiteListAdd,
  merchantWhiteListPage,
  
  memberCreate,
  memberParam,
  
  merchantOperatorHistory,
  merchantLoginHistory,
  addUserMerchant,
  merchantInfo,
  merchantUpdate,
  merchantList,
  merchantResetTransPwd,
  merchantResetPrivateKey,
  merchantResetLoginPwd,
  merchantRecharge,
  merchantDraw,
  merchantBalanceHistory,
  checkTransPwd,
  
  
  bindAccount,
  reset,
  checkBind,
  resetUserSecret,
  secret,
  
  queryHistory,
  operatorList,
  historyList,
  
  roleList,
  addRole,
  updateRole,
  delRole,
  findByRoleId,
  getPermissionList,
  
  systemSettingSave,
  systemSettingInfo,
  
  payeeUpdate,
  payeeUpdateStatus,
  payeeSave,
  payeeInfo,
  payeeList,
  payeeDetele,
  
  depositWithdUpdate,
  depositWithdUpdateStatus,
  depositWithdSave,
  depositWithdInfo,
  depositWithdList,
  depositWithdDetele,
  
  advertUpdate,
  advertUpdateStatus,
  advertSave,
  advertInfo,
  advertList,
  advertDetele,
  
  gradeUpdate,
  gradeUpdateStatus,
  gradeSave,
  gradeInfo,
  gradeList,
  gradeDetele,
  
  noticeUpdate,
  noticeUpdateStatus,
  noticeSave,
  noticeInfo,
  noticeList,
  noticeDetele,
  
  bankUpdate,
  bankUpdateStatus,
  bankSave,
  bankInfo,
  bankList,
  bankDetele,
  
  merchantClassList,
  merchantClassUpdate,
  merchantClassSave,
  merchantClassDetele,
  merchantClassInfo,
  
  whiteList,
  whiteUpdate,
  whiteSave,
  whiteDetele,
  whiteInfo,
  
  blackList,
  blackUpdate,
  blackSave,
  blackDetele,
  blackInfo,
  
  currencyList,
}